﻿
<style>
    tr > th {
        border: solid 1px black;
    }

    tr > td {
        border: solid 1px black;
    }
</style>
@*把每个边框加黑色1px的像素*@
<table>
    @*代表表格*@
    <tr>
        @*tr代表表格中的行*@
        <th>id</th> @*th代表表格头，字段名*@
        <th>class_name</th>
        <th>major_name</th>
        <th>student_id</th>
        <th>course_name</th>
        <th>check_sum</th>
        <th>check</th>
        <th>score</th>
    </tr>
    @foreach (var item in Model)@*利用循环定义item并引用类*@
    {
<tr>
    <td>@item.id</td>
    @*td代表表格列，字段名*@
    <td>@item.class_name</td>
    <td>@item.major_name</td>
    <th>@item.student_id</th>
    <th>@item.course_name</th>
    <th>@item.check_sum</th>
    <th>@item.check</th>
    <th>@item.score</th>
</tr>
    }
</table>
